# -*- coding: utf-8 -*-
"""
OCR back-end server application.
Created on Mon Jul 10 11:00:00 2017
Author: Prasun Roy | CVPRU-ISICAL (http://www.isical.ac.in/~cvpr)
GitHub: https://github.com/prasunroy/ocr

"""


# mapping from class label to ascii or unicode
map2ascii_en_numbers = {
        0: 48,
        1: 49,
        2: 50,
        3: 51,
        4: 52,
        5: 53,
        6: 54,
        7: 55,
        8: 56,
        9: 57
}

map2ascii_en_letters = {
        0: 48,
        1: 49,
        2: 50,
        3: 51,
        4: 52,
        5: 53,
        6: 54,
        7: 55,
        8: 56,
        9: 57,
        10: 65,
        11: 66,
        12: 67,
        13: 68,
        14: 69,
        15: 70,
        16: 71,
        17: 72,
        18: 73,
        19: 74,
        20: 75,
        21: 76,
        22: 77,
        23: 78,
        24: 79,
        25: 80,
        26: 81,
        27: 82,
        28: 83,
        29: 84,
        30: 85,
        31: 86,
        32: 87,
        33: 88,
        34: 89,
        35: 90,
        36: 97,
        37: 98,
        38: 100,
        39: 101,
        40: 102,
        41: 103,
        42: 104,
        43: 110,
        44: 113,
        45: 114,
        46: 116
}

map2unicode_bn_numbers = {
        0: '\u09e6',
        1: '\u09e7',
        2: '\u09e8',
        3: '\u09e9',
        4: '\u09ea',
        5: '\u09eb',
        6: '\u09ec',
        7: '\u09ed',
        8: '\u09ee',
        9: '\u09ef'
}

map2unicode_bn_letters = {
        0: '\u0985',
        1: '\u0986',
        2: '\u0987',
        3: '\u0988',
        4: '\u0989',
        5: '\u098a',
        6: '\u098f',
        7: '\u0990',
        8: '\u0993',
        9: '\u0994',
        10: '\u098b',
        11: '\u0995',
        12: '\u0996',
        13: '\u0997',
        14: '\u0998',
        15: '\u0999',
        16: '\u099a',
        17: '\u099b',
        18: '\u099c',
        19: '\u099d',
        20: '\u099e',
        21: '\u099f',
        22: '\u09a0',
        23: '\u09a1',
        24: '\u09a2',
        25: '\u09a3',
        26: '\u09a4',
        27: '\u09a5',
        28: '\u09a6',
        29: '\u09a7',
        30: '\u09a8',
        31: '\u09aa',
        32: '\u09ab',
        33: '\u09ac',
        34: '\u09ad',
        35: '\u09ae',
        36: '\u09af',
        37: '\u09b0',
        38: '\u09b2',
        39: '\u09b6',
        40: '\u09b7',
        41: '\u09b8',
        42: '\u09b9',
        43: '\u09dc',
        44: '\u09dd',
        45: '\u09df',
        46: '\u0982',
        47: '\u0983',
        48: '\u0981',
        49: '\u09ce',
        50: '\u098c',
        51: '\u09cd'
}

map2unicode_dv_numbers = {
        0: '\u0966',
        1: '\u0967',
        2: '\u0968',
        3: '\u0969',
        4: '\u096a',
        5: '\u096b',
        6: '\u096c',
        7: '\u096d',
        8: '\u096e',
        9: '\u096f'
}

map2unicode_dv_letters = {
        0: '\u0905',
        1: '\u0906',
        2: '\u0907',
        3: '\u0908',
        4: '\u0909',
        5: '\u090a',
        6: '\u090f',
        7: '\u0910',
        8: '\u0913',
        9: '\u0914',
        10: '\u0902',
        11: '\u0903',
        12: '\u0901',
        13: '\u0960',
        14: '\u0915',
        15: '\u0916',
        16: '\u0917',
        17: '\u0918',
        18: '\u0919',
        19: '\u091a',
        20: '\u091b',
        21: '\u091c',
        22: '\u091d',
        23: '\u091e',
        24: '\u091f',
        25: '\u0920',
        26: '\u0921',
        27: '\u0922',
        28: '\u0923',
        29: '\u0924',
        30: '\u0925',
        31: '\u0926',
        32: '\u0927',
        33: '\u0928',
        34: '\u092a',
        35: '\u092b',
        36: '\u092c',
        37: '\u092d',
        38: '\u092e',
        39: '\u092f',
        40: '\u0930',
        41: '\u0932',
        42: '\u0935',
        43: '\u0936',
        44: '\u0937',
        45: '\u0938',
        46: '\u0939'
}
